const mysql = require('mysql2');

const pool = mysql.createPool({
  host: "localhost",
  user: "root",
  password: "ppqppq123527.",
  database: "library_sys",
  charset: 'utf8mb4',  // 使用支持全 Unicode 字符集的字符集
  supportBigNumbers: true,
  bigNumberStrings: true,
  connectionLimit: 10, // 根据需要调整连接池大小
  queueLimit: 0 // 0 表示无限等待队列
});



module.exports = pool.promise();